﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Calendar.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/Default/Calendar/Style/Calendar.css" />
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/controls/JskitControls.css" />
    <script type="text/javascript" src="/jskit.org/model/controls/JskitRichDropDownList.js"></script>
    <script type="text/javascript">
        var jrddlUser = new JskitRichDropDownList("jrddlUser");
        jrddlUser.setIsMultiSelect(true);
        jrddlUser.setColumns(["姓名", "部门","职务"]);
        function PageOnLoad() {
            jrddlUser.deploy(fixId("txt_UserName"), fixId("hid_UserKey"), "Ws/_User.aspx?mode=low&self=1");
        }
    </script></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
<asp:Label runat="server" ID="lab_info"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <fieldset>
        <legend>查询</legend>
        <table>
            <tr>
                <td>用户：</td>
                <td>
                    <asp:TextBox runat="server" ID="txt_UserName" Width="300px"></asp:TextBox>
                    <asp:HiddenField runat="server" ID="hid_UserKey" />
                </td>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                <td>
                    时间段：
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txt_FromDt" onclick="return jskitDateSelector.open(this,event);"></asp:TextBox>
                    --
                    <asp:TextBox runat="server" ID="txt_ToDt" onclick="return jskitDateSelector.open(this,event);"></asp:TextBox>
                </td>
            </tr>
        </table>
    </fieldset>
    <div class="action_bar">
        <asp:Button ID="btn_Query" runat="server" Text="查看" 
            onclick="btn_Query_Click1" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btn_EOAdd" runat="server" Text="增加" OnClick="btn_EOAdd_Click" />
        <asp:Button ID="btn_EOUpdate" runat="server" Text="修改" OnClientClick="return acu.gv.checkModify(fixId('gvTodo'));"
            OnClick="btn_EOUpdate_Click" />
        <asp:Button ID="btn_EODel" runat="server" Text="删除" OnClientClick="return acu.gv.checkDelete(fixId('gvTodo'));"
            OnClick="btn_EODel_Click" />
        <input type="button" onclick="jskitBulter.redirect('Admin/Calendar/Default.aspx')" value="返回" />
    </div>
    <fieldset>
        <legend>待办事项列表</legend>
        <asp:GridView ID="gvTodo" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="TodoKey" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
            OnPageIndexChanging="gvItem_PageIndexChanging">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                            type="checkbox" title="点击全选或反全选当前页所有信息" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="状态">
                    <ItemStyle Width="18px" />
                    <ItemTemplate>
                        <div class='sign_yn<%# DataBinder.Eval(Container, "DataItem.IfClose")%>'></div>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="标题">
                    <ItemTemplate>
                        <img width="16px" height="16px" src='/cellula_client/default/calendar/images/sign_<%# DataBinder.Eval(Container, "DataItem.TodoLevel")%>.png' alt='<%# DataBinder.Eval(Container, "DataItem.LevelName")%>' />
                        <a class='cal_list_link<%# DataBinder.Eval(Container, "DataItem.IfClose")%>' href='Admin/Calendar/TodoView.aspx?id=<%# DataBinder.Eval(Container, "DataItem.TodoKey")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.TodoTitle")%></a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:BoundField DataField="TypeName" HeaderText="类型"></asp:BoundField>
                <asp:BoundField DataField="RefItemName" HeaderText="归属"></asp:BoundField>
                <asp:BoundField DataField="OperatorName" HeaderText="来源"></asp:BoundField>
                <asp:BoundField DataField="AssignToUserName" HeaderText="指派给"></asp:BoundField>
                <asp:BoundField DataField="CostHours" HeaderText="耗时" ControlStyle-Width="20px"></asp:BoundField>
                 <asp:TemplateField HeaderText="计划">
                    <ItemStyle Width="120px" />
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container, "DataItem.StartToPlan")%>
                        <br />--
                        <br /><%# DataBinder.Eval(Container, "DataItem.StartToPlan")%>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>                
                 <asp:TemplateField HeaderText="实际">
                    <ItemStyle Width="120px" />
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container, "DataItem.StartToReal")%>
                        <br />--
                        <br /><%# DataBinder.Eval(Container, "DataItem.EndToReal")%>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>                
                </Columns>
            <PagerTemplate>
                <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
</asp:Content>
